
package com.epam.android.training.level1.db.dao;

import com.epam.android.training.level1.rss.ItemBo;
import com.epam.android.training.level1.rss.NewsFeed;

import java.net.URL;
import java.util.List;

/**
 * @author Anton Novikau
 */
public interface RssDao {

  boolean syncFeeds();

  long createFeed(URL feedUrl);

  NewsFeed findFeed(long feedId, boolean isLight);

  NewsFeed findFeed(URL feedUrl, boolean isLight);

  /**
   * Finds only light feeds to avoid huge memory consumption.
   * 
   * @return
   */
  List<NewsFeed> findAllFeeds();

  String getFeedTitle(long feedId);

  String getLatestNewsTitle();

  List<ItemBo> findFeedItems(long feedId);

  List<String> findCategories(long feedId);

  boolean markAsRead(long itemId);
  // TODO: delete methods must be also supported.
}
